package com.shawn.springboot.integeration.netty.model;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author zhangjian
 * @title: ServerAddress
 * @projectName 12-springboot学习
 * @description: 服务器地址信息
 * @date 2021/4/2713:37
 */
@Getter
@AllArgsConstructor
public class ServerAddress {
    private final String ip;                //  服务端IP
    private final Integer port;             //  服务端地址
    private int connectTimeout = 3000;      //  客户端连接超时时间
    private boolean longConnection = true;  //  是否是长连接,默认长连接

    public ServerAddress(String ip, Integer port) {
        this.ip = ip;
        this.port = port;
    }

    public ServerAddress(String ip,Integer port,boolean longConnection) {
        this.ip = ip;
        this.port = port;
        this.longConnection = longConnection;
    }
}
